package com.nowc.week.w105_ak;

import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

public class d {

    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static StreamTokenizer in = new StreamTokenizer(br);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        solve();
        out.flush();
        out.close();
        br.close();
    }

    static void solve() throws IOException {
        in.nextToken(); int n = (int) in.nval;
        in.nextToken(); int k = (int) in.nval;
        int c2 = 0;
        for (int i = 0; i < n; i++) {
            in.nextToken(); int x = (int) in.nval;
            if (x == 2) c2++;
        }
        int x = k - (n - 1) + 1;
        int c1 = n - c2;
        if (c2 < x) {
            out.println(-1);
            return;
        }
        List<Integer> ans = new ArrayList<>();
        c2 -= x;
        for (int i = 0; i < x; i++) {
            ans.add(2);
        }
        while (ans.size() < n) {
            if (c1 > 0) {
                ans.add(1);
                c1--;
            }
            if (c2 > 0) {
                ans.add(2);
                c2--;
            }
        }
        if (x < n) {
            for (int i = x; i < n; i++) {
                if (i + 1 < n) {
                    if (Objects.equals(ans.get(i), ans.get(i + 1)) && ans.get(i) == 2) {
                        out.println(-1);
                        return;
                    }
                }
            }
        }

        for (Integer i : ans) {
            out.print(i + " ");
        }
        out.println();
    }

}
